package com.system.appointment.service.impl;

import com.system.appointment.bean.Appointment;
import com.system.appointment.service.RefundStrategy;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

/**
 * @className: OneDayRefundStrategy
 * @description: 小于一天退款策略，其中，扣除20%的手续费
 * @author: Li Chuanwei
 * @date: 2023/12/12 16:11
 * @Company: Copyright [日期] by [作者或个人]
 **/

public class OneDayRefundStrategy implements RefundStrategy {
    private static final BigDecimal REFUND_PERCENTAGE = new BigDecimal("0.8");

    @Override
    public BigDecimal calculateRefundAmount(BigDecimal price) {
        return price.multiply(REFUND_PERCENTAGE);
    }
}
